package com.yingluo.abacus.cloud.service.web;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.yingluo.abacus.cloud.service.web.utils.ServiceWebUtils;


@FeignClient(value = "${spring.application.host-service}",fallback = Hystric.class)
public interface IFeign {
  @RequestMapping(value = ServiceWebUtils.MODULE_SERIVCEPROVIDER + "/hello",method = RequestMethod.GET)
  String excute( );
}

@Component
class Hystric implements IFeign {
  @Override
  public String excute( ) {
      return "sorry,Hystric " ;
  }
}